<template>
  <div class="p-4 space-y-4">
    <div class="text-xl font-bold text-blue-700 mb-2">useDelete</div>
    <div class="text-gray-700 mb-2">
      DELETE 请求封装，支持参数，基于 useRequest + axiosInstance。
    </div>
    <div class="bg-white rounded-xl p-4 shadow">
      <div class="font-bold mb-2 text-blue-600">用法</div>
      <pre class="bg-blue-50 rounded p-3 text-sm text-blue-700 overflow-x-auto">
const { data, run, loading } = useDelete('/api/user/1')
// 传递参数
run()</pre
      >
    </div>
    <div class="bg-white rounded-xl p-4 shadow">
      <div class="font-bold mb-2 text-green-600">示例1</div>
      <pre class="bg-green-50 rounded p-3 text-sm text-green-700 overflow-x-auto">
const { data, run } = useDelete('/api/product/2')
run()</pre
      >
    </div>
    <div class="bg-white rounded-xl p-4 shadow">
      <div class="font-bold mb-2 text-green-600">示例2</div>
      <pre class="bg-green-50 rounded p-3 text-sm text-green-700 overflow-x-auto">
const { data, run } = useDelete('/api/user/3', { manual: true })
run()</pre
      >
    </div>
    <div class="bg-white rounded-xl p-4 shadow border-l-4 border-blue-400">
      <div class="font-bold mb-2 text-gray-700">说明</div>
      <div class="text-xs text-gray-600 leading-relaxed">
        适用于 DELETE 删除接口，支持自动/手动请求、loading、错误处理等。<br />
        依赖 axiosInstance 和 vue-request，参数会自动拼接到 URL 查询字符串。
      </div>
    </div>
  </div>
</template>
